/*
 * Copyright 2005-2013 sxhuayuan.com. All rights reserved.
 * Support: http://www.sxhuayuan.com
 * License: http://www.sxhuayuan.com/license
 */
package com.sxhuayuan.parking.dao;

import org.springframework.data.jpa.repository.Query;

import com.sxhuayuan.parking.entity.PluginConfig;

/**
 * Dao - 插件配置
 * 
 * @author gaoyan
 * @version 1.0
 */
public interface PluginConfigDao extends BaseDao<PluginConfig, Long> {

	/**
	 * 判断插件ID是否存在
	 * 
	 * @param pluginId
	 *            插件ID
	 * @return 插件ID是否存在
	 */
	@Query(value = "select count(id)>0 from PluginConfig where pluginId=?1")
	boolean pluginIdExists(String pluginId);

	/**
	 * 根据插件ID查找插件配置
	 * 
	 * @param pluginId
	 *            插件ID
	 * @return 插件配置，若不存在则返回null
	 */
	PluginConfig findByPluginId(String pluginId);

}